SharedElementCallback
Listener provided in setEnterSharedElementCallback and setExitSharedElementCallback to monitor the Activity transitions. The events can be used to customize Activity Transition behavior.
Types
Link copied to clipboard
interface OnSharedElementsReadyListener
Listener to be called after onSharedElementsArrived when the shared elements are ready to be hidden in the source Activity and shown in the destination Activity.
Functions
Link copied to clipboard
open fun onCaptureSharedElementSnapshot(sharedElement: View, viewToGlobalMatrix: Matrix, screenBounds: RectF): Parcelable
Creates a snapshot of a shared element to be used by the remote Activity and reconstituted with onCreateSnapshotView.
Link copied to clipboard
Reconstitutes a snapshot View from a Parcelable returned in onCaptureSharedElementSnapshot to be used in onSharedElementStart and onSharedElementEnd.
Link copied to clipboard
Link copied to clipboard
Called after onMapSharedElements when transferring shared elements in.
Link copied to clipboard
open fun onSharedElementEnd(sharedElementNames: List<String>, sharedElements: List<View>, sharedElementSnapshots: List<View>)
In Activity Transitions, onSharedElementEnd is called immediately before capturing the end of the shared element state on enter and reenter transitions and immediately before capturing the start of the shared element state for exit and return transitions.
Link copied to clipboard
open fun onSharedElementsArrived(sharedElementNames: List<String>, sharedElements: List<View>, listener: SharedElementCallback.OnSharedElementsReadyListener)
Called during an Activity Transition when the shared elements have arrived at the final location and are ready to be transferred.
Link copied to clipboard
open fun onSharedElementStart(sharedElementNames: List<String>, sharedElements: List<View>, sharedElementSnapshots: List<View>)
In Activity Transitions, onSharedElementStart is called immediately before capturing the start of the shared element state on enter and reenter transitions and immediately before capturing the end of the shared element state for exit and return transitions.